#!/usr/bin/env node

import { CacheManager } from './dist/services/cache-manager.js';
import path from 'path';

console.log('Debug: process.cwd():', process.cwd());
console.log('Debug: __dirname equivalent:', path.dirname(new URL(import.meta.url).pathname));

const cacheManager = new CacheManager(process.cwd());
console.log('Debug: Cache file path:', path.join(process.cwd(), '.mcp', 'file-hashes.json'));

try {
    await cacheManager.loadCache();
    const allHashes = cacheManager.getAllHashes();
    const cachedFiles = Object.keys(allHashes);
    console.log('Debug: Cached files count:', cachedFiles.length);
    console.log('Debug: First few cached files:', cachedFiles.slice(0, 3));
} catch (error) {
    console.log('Debug: Error loading cache:', error.message);
}